<?php
/**
 * Magento Enterprise Edition
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Magento Enterprise Edition End User License Agreement
 * that is bundled with this package in the file LICENSE_EE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.magento.com/license/enterprise-edition
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     default_default
 * @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
 * @license http://www.magento.com/license/enterprise-edition
 */
?>
<?php $catId = $this->getCategoryId(); ?>
<script type="text/javascript">
    //<![CDATA[
    var merJSObject = new merchandiserJS();
    //]]>
</script>

<?php if ($catId): ?>
    <?php echo $this->getChildHtml('merchandiser.top.buttons') ?>

    <div style="float:right;">
        <?php echo $this->getChildHtml('merchandiserSearch') ?>
    </div>

    <div id="background_tilt"></div>

    <div id="massproductassignent" class="mass_product_assignment_div">
        <a onclick="merJSObject.hideMassProducts()" class="mass-product-close-button"><?php echo $this->__("Close") ?></a>
        <div class="mass-product-assign-bounder">
            <h3><?php echo Mage::helper('merchandiser')->__('Please enter SKUs below, one per line.') ?></h3>
            <div id="progressbar"></div>
            <p id="massproductresult"></p>
            <div>
                <br />
                <textarea cols="180" rows="10" id="massproduct_skus" name="massproduct_skus"></textarea>
                <br />
                <div class="masproduct-button">
                    <button id="addMassButton" class="button" type="button">
                        <span>
                            <span><?php echo Mage::helper('merchandiser')->__('Assign Products') ?></span>
                        </span>
                    </button>
                    <button id="removeMassButton" class="button" type="button">
                        <span>
                            <span><?php echo Mage::helper('merchandiser')->__('Remove Products') ?></span>
                        </span>
                    </button>
                </div>
            </div>
        </div>
    </div>

    <div id="merchandiser-categories">
        <form id="product-ordering-form" method="post" action="">
            <div class="buttons">
                <?php echo $this->getChildHtml('merchandiser.submit.button') ?>
                <input type="hidden" name="category_id" value="<?php echo $catId ?>" />
                <input type="hidden" name="store_id" value="<?php echo Mage::app()->getStore()->getId() ?>" />
                <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
            </div>
            <?php echo $this->getChildHtml('merchandiser.category.list') ?>
        </form>
    </div>

    <form action="<?php echo Mage::helper('adminhtml')->getUrl('adminhtml/merchandiser/updatePosition') ?>" method="post" id="move_bottom_form">
        <input type="hidden" name="cat" value="<?php echo $catId ?>" />
        <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
        <input type="hidden" id="mer_prods" name="prods" value="" />
    </form>

<?php else : ?>
    <div class="error"><?php echo Mage::helper('merchandiser')->__('No Category set') ?></div>
<?php endif; ?>
